package com.tac.controller;

import com.tac.common.result.Result;
import com.tac.pojo.Information;
import com.tac.service.InformationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/information")
@RestController
@Api(tags = "法策法规接口")
@CrossOrigin
public class InformationController {

    @Autowired
    private InformationService informationService;

    @GetMapping("/getInformation")
    @ApiOperation("查看企业信息")
    public Result<Information> getInformation(){
        return informationService.getInformation();
    }

    @PutMapping("/update")
    @ApiOperation("修改企业信息")
    public Result update(@RequestBody Information information){
        return informationService.update(information);
    }
}
